package com.ming.interview;

/**
 * @Description 有1、2、3、4个数字，能组成多少个互不相同且无重复数字的三位数？都是多少？
 * @Author ye.ming
 * @Date Created in 2019/8/26
 */
public class Main10 {

    public static void main(String[] args) {

        int count = 1;
        for (int i = 1; i < 5; i++) {
            for (int j = 1; j < 5; j++) {
                for (int k = 1; k < 5; k++) {
                    if (m1(i, j, k)) {
                        System.out.print(" " + i + j + k);
                        if (count % 10 == 0) {
                            System.out.println();
                        }
                        count++;
                    }
                }
            }
        }

    }


    private static boolean m1(int a, int b, int c) {

        if (a != b && a != c && b != c) {
            return true;
        } else {
            return false;
        }
    }


}
